package com.ruoyi.prod.controller;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.prod.entity.po.ProdUseApplyItem;
import com.ruoyi.prod.service.ProdUseApplyItemService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 使用管理-使用申请-条目明细 前端控制器
 * </p>
 *
 * @author 强子初
 * @since 2023-02-25
 */
@Api(tags = "使用管理-资产使用")
@RestController
@RequestMapping("/prod/use/apply/item")
public class ProdUseApplyItemController {

    @Autowired
    ProdUseApplyItemService baseService;

    /**
     * 根据资产id获取详情
     */
    @ApiOperation("根据资产id获取详情")
    @GetMapping("/get/assetId/{assetId}")
    public R<ProdUseApplyItem> getInfoByAssetId(@PathVariable String assetId) {
        return R.ok(baseService.getByAssetId(assetId));
    }
}
